/*------------------------------------------------------------------------------

Paper:			- Black Empowerment and White Mobilization:
					The Effects of the Voting Rights Act

Journal:		- Journal of Political Economy, 2025

Authors:		- Andrea Bernini:
					University of Oxford					
				- Giovanni Facchini:
					University of Nottingham, CEPR, CES-Ifo, CReAM, GEP, IZA
				- Marco Tabellini:
					Harvard Business School, NBER, CEPR, CReAM, IZA
				- Cecilia Testa:
					University of Nottingham, NICEP, CEPR

Instructions:	- README.pdf

------------------------------------------------------------------------------*/

clear all

// Change the directory
global user				"C:\local_directory"

global dataset				"$user\datasets"
global output	            "$user\output"

// .ado files
run "$user\twowaycluster_1.ado"
run "$user\twowaycluster_2.ado"

// Controls
global controls_figure_1 "c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc"
global controls_figure_2 "c.family_less_3000#literacy_nc##ib(#2).year c.unemp60#literacy_nc##ib(#2).year c.rural_farm60#literacy_nc##ib(#2).year c.cotton_share_acre#literacy_nc##ib(#2).year"
global controls_figure_4 "c.family_less_3000#literacy_nc##ib(#5).year c.unemp60#literacy_nc##ib(#5).year c.rural_farm60#literacy_nc##ib(#5).year c.cotton_share_acre#literacy_nc##ib(#5).year c.school_low#literacy_nc##ib(#5).year c.pro_black_county#literacy_nc##ib(#5).year c.anti_black_county#literacy_nc##ib(#5).year c.gb_tot_1955_b#literacy_nc##ib(#5).year"
global controls_figure_6 "c.family_less_3000#literacy_nc##ib(#5).year c.unemp60#literacy_nc##ib(#5).year c.rural_farm60#literacy_nc##ib(#5).year c.cotton_share_acre#literacy_nc##ib(#5).year c.school_low#literacy_nc##ib(#5).year c.pro_black_county#literacy_nc##ib(#5).year c.anti_black_county#literacy_nc##ib(#5).year c.gb_tot_1955_b#literacy_nc##ib(#5).year"
global controls_figure_7 "i.age_10 gender i.education i.citysize i.occupation"

global controls_table_3 "family_less_3000 unemp60 rural_farm60 cotton_share_acre school_low pro_black_county anti_black_county gb_tot_1955_b"
global controls_table_3_no_cotton "family_less_3000 unemp60 rural_farm60 school_low pro_black_county anti_black_county gb_tot_1955_b"
global controls_table_5 "p_family_less_3000 p_unemp60 p_rural_farm60 p_cotton_share_acre p_school_low p_pro_black_county p_anti_black_county p_gb_tot_1955_b p_vra_family_less_3000 p_vra_unemp60 p_vra_rural_farm60 p_vra_cotton_share_acre p_vra_school_low p_vra_pro_black_county p_vra_anti_black_county p_vra_gb_tot_1955_b"
global controls_table_6 "c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.pro_black_county#literacy_nc c.anti_black_county#literacy_nc c.gb_tot_1955_b#literacy_nc"

global controls_int "c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.school_low#literacy_nc c.pro_black_county#literacy_nc c.anti_black_county#literacy_nc c.gb_tot_1955_b#literacy_nc"

// Globals
global black "black_share60_d56 black_share60_d60 black_share60_d64 black_share60_d68 black_share60_d72 black_share60_d76 black_share60_d80"
global black_lit "black_share60_lit_d56 black_share60_lit_d60 black_share60_lit_d64 black_share60_lit_d68 black_share60_lit_d72 black_share60_lit_d76 black_share60_lit_d80"
global time_court_cases "literacy_d12 literacy_d13 literacy_d14 literacy_d15 literacy_d16 literacy_d17 literacy_d18 literacy_d19 literacy_d20 literacy_d21 literacy_d22 literacy_d23 literacy_d24"
global plot_time_court_cases "literacy_d13 literacy_d14 literacy_d15 literacy_d16 literacy_d17 literacy_d18 literacy_d19 literacy_d20 literacy_d21 literacy_d22 literacy_d23"
global time_beo "literacy_d9 literacy_d10 literacy_d11 literacy_d12 literacy_d13 literacy_d14 literacy_d15 literacy_d16 literacy_d17 literacy_d18 literacy_d19 literacy_d20 literacy_d21"
global plot_time_beo "literacy_d10 literacy_d11 literacy_d12 literacy_d13 literacy_d14 literacy_d15 literacy_d16 literacy_d17 literacy_d18 literacy_d19 literacy_d20"
global gallup_interactions "rural uned old male"
global pol_par1960 "votreg_black_pct_presyears1960 votreg_white_pct_presyears1960 blackwhite_gap1960"
global pol_par1980 "votreg_black_pct_presyears1980 votreg_white_pct_presyears1980 blackwhite_gap1980"
global cou_cha_vot "black_share60 pop1960_1000 school_low unemp60 family_less_3000 rural_farm60 cotton_share_acre_100 pro_black_county anti_black_county gb_tot_1955"
global cou_cha_full "black_share60 pop1960_1000 school_low unemp60 family_less_3000 rural_farm60 cotton_share_acre_100 pro_black_county anti_black_county gb_tot_1955"



/*
Figure 1. Registration rates: Trends in the gradient
*/
cd $dataset
use "dataset_panel_1.dta", clear

// Panel A
foreach x in 56 60 64 68 72 76 80 {
		xi, prefix(Tr): reg ln_votreg_black_pct_pres black_share60 c.black_share60#literacy_nc $controls_figure_1 i.STATE if year==19`x' [aweight=pop1960], robust cluster (judicial_divisions_id)
		margins, at(literacy_nc=1) dydx(black_share60) post
		est sto sharebl`x'_l1
}
foreach x in 56 60 64 68 72 76 80 {
		xi, prefix(Tr): reg ln_votreg_black_pct_pres black_share60 c.black_share60#literacy_nc $controls_figure_1 i.STATE if year==19`x' [aweight=pop1960], robust cluster (judicial_divisions_id)
		margins, at(literacy_nc=0) dydx(black_share60) post
		est sto sharebl`x'_l0
}

coefplot (sharebl56_l1, offset(-0.39) msymbol(O) color(black) ciopts(lwidth(0) lcolor(black) recast(rcap))) (sharebl56_l0, offset(-0.36) msymbol(Oh) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl60_l1, offset(-0.26) msymbol(O) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl60_l0, offset(-0.23) msymbol(Oh) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl64_l1, offset(-0.13) msymbol(O) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl64_l0, offset(-0.10) msymbol(Oh) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl68_l1, offset(0.00) msymbol(O) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl68_l0, offset(0.03) msymbol(Oh) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl72_l1, offset(0.13) msymbol(O) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl72_l0, offset(0.16) msymbol(Oh) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl76_l1, offset(0.26) msymbol(O) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl76_l0, offset(0.29) msymbol(Oh) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl80_l1, offset(0.39) msymbol(O) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) (sharebl80_l0, offset(0.42) msymbol(Oh) color(black) ciopts(lwidth(*0) lcolor(black) recast(rcap))) , ///
subtitle(, fcolor(white)) xlabel(0.62 "1956" 0.75 "1960" 0.88 "1964" 1.01 "1968" 1.14 "1972" 1.27 "1976" 1.4 "1980" ) drop(TrSTATE_*_cons) vertical yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) legend(order(2 "Covered" 4 "Not Covered")) ylabel(, nogrid) graphregion(color(white)) graphregion(color(white)) bgcol(color(white)) omitted ytitle("(ln) registration rate") yscale(range(-0.04 0.04)) ylabel(-0.04(0.02)0.04) xline(0.92, lwidth(0.2) lcolor(gray) lpattern(solid)) format(%9.3f) legend(rows(1) size(small) position(6) region(lcolor(white)))
cd $output
graph export "figure_1_a.pdf", replace
graph export "figure_1_a.eps", replace

// Panel B
foreach x in 56 60 64 68 72 76 80 {
		xi, prefix(Tr): reg ln_votreg_white_pct_pres black_share60 c.black_share60#literacy_nc $controls_figure_1 i.STATE if year==19`x' [aweight=pop1960], robust cluster(judicial_divisions_id)
		margins, at(literacy_nc=1) dydx(black_share60) post
		est sto sharebl`x'_l1_w
}
foreach x in 56 60 64 68 72 76 80 {
		xi, prefix(Tr): reg ln_votreg_white_pct_pres black_share60 c.black_share60#literacy_nc $controls_figure_1 i.STATE if year==19`x' [aweight=pop1960], robust cluster(judicial_divisions_id)
		margins, at(literacy_nc=0) dydx(black_share60) post
		est sto sharebl`x'_l0_w
}

coefplot (sharebl56_l1_w, offset(-0.39) msymbol(S) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl56_l0_w, offset(-0.36) msymbol(Sh) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl60_l1_w, offset(-0.26) msymbol(S) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl60_l0_w, offset(-0.23) msymbol(Sh) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl64_l1_w, offset(-0.13) msymbol(S) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl64_l0_w, offset(-0.10) msymbol(Sh) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl68_l1_w, offset(0.00) msymbol(S) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl68_l0_w, offset(0.03) msymbol(Sh) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl72_l1_w, offset(0.13) msymbol(S) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl72_l0_w, offset(0.16) msymbol(Sh) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl76_l1_w, offset(0.26) msymbol(S) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl76_l0_w, offset(0.29) msymbol(Sh) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl80_l1_w, offset(0.39) msymbol(S) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) (sharebl80_l0_w, offset(0.42) msymbol(Sh) color(gs9) ciopts(lwidth(*0.0) lcolor(black) recast(rcap))) , ///
subtitle(, fcolor(white)) xlabel(0.62 "1956" 0.75 "1960" 0.88 "1964" 1.01 "1968" 1.14 "1972" 1.27 "1976" 1.4 "1980" ) drop(TrSTATE_*_cons) vertical yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) legend(order(2 "Covered" 4 "Not Covered")) ylabel(, nogrid) graphregion(color(white)) graphregion(color(white)) bgcol(color(white)) omitted ytitle("(ln) registration rate") yscale(range(-0.01 0.01)) ylabel(-0.01(0.005)0.01) xline(0.92, lwidth(0.2) lcolor(gray) lpattern(solid)) format(%9.3f) legend(rows(1) size(small) position(6) region(lcolor(white)))
cd $output
graph export "figure_1_b.pdf", replace
graph export "figure_1_b.eps", replace



/*
Figure 2. Registration rates: Difference in the gradient
*/
cd $dataset
use "dataset_panel_1.dta", clear

// Black voter registration rates
xi, prefix(Tr): xtreg ln_votreg_black_pct_pres $black $black_lit $controls_figure_2 dummy_STATE_NC1_YEAR1-dummy_STATE_NC11_YEAR7 [aweight=pop1960] if year >= 1956 & year <= 1980, fe robust cluster(judicial_divisions_id)
estimates store est_bl

// White voter registration rates
xi, prefix(Tr): xtreg ln_votreg_white_pct_pres $black $black_lit $controls_figure_2 dummy_STATE_NC1_YEAR1-dummy_STATE_NC11_YEAR7 [aweight=pop1960] if year >= 1956 & year <= 1980 & FIPSTATE != 28, fe robust cluster(judicial_divisions_id)
estimates store est_wh

coefplot (est_bl, offset(-0.08) msymbol(O) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap)) label(Black voter registration)) (est_wh, offset(0.08) msymbol(S) color(gs9) ciopts(lwidth(*1.5) lcolor(gs9) recast(rcap)) label(White voter registration)), keep( $black_lit ) levels(95) ylabel(, nogrid) graphregion(color(white)) vertical xline(3.3, lwidth(0.2) lcolor(gray) lpattern(solid)) yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) format(%9.2f) color(black) lwidth(thick) omitted ytitle("(ln) registration rate") yscale(range(-0.03 0.03)) ylabel(-0.03(0.01)0.03) legend(position(6) rows(1) size(small) region(lcolor(white)))
cd $output
graph export "figure_2.eps", replace
graph export "figure_2.pdf", replace


/*
Figure 3. Balancing tests in the border sample: Pre-VRA levels and trends
*/

// Panel A
cd $dataset
use "dataset_border_1.dta", clear

foreach var of varlist black_share60 school_low unemp60 family_less_3000 pro_black_county anti_black_county rural_farm60 cotton_share_acre pop1960 gb_tot_1955_b {

	quietly summarize `var'
	gen `var'_std = (`var' - r(mean)) / r(sd)
	twowayclusterBTF_withconst `var'_std literacy_nc , w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
	est sto `var'_std

	}

coefplot (unemp60_std, label(Unemployment (%), 1960) msymbol(O) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (family_less_3000_std, label(Poverty (%), 1960) msymbol(Oh) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (school_low_std, label(Unskilled workers (%), 1960) msymbol(S) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (rural_farm60_std, label(Rural farm (%), 1960) msymbol(Sh) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (cotton_share_acre_std, label(Harvested cotton (%), 1959) msymbol(D) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (black_share60_std, label(Black share (%), 1960) msymbol(Dh) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (pop1960_std, label(Population (%), 1960) msymbol(T) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (gb_tot_1955_b_std, label(Green Book (%), 1955) msymbol(Th) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (pro_black_county_std, label(Pro-Black protests, 1960-64) msymbol(X) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (anti_black_county_std, label(Anti-Black protests, 1960-64) msymbol(v) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) ///
, keep(literacy_nc) title() levels(95) ytitle("") ylabel("") xtitle("Coefficients") legend(rows(5) size(small) position(6) region(lcolor(white))) xline(0, lpattern(dash)) xlabels( , labs(medium) labgap() format(%9.1f)) graphregion(color(white)) xlabel(-1.0(0.5)1.0) xscale(range(-1.0(0.5)1.0))

cd $output
graph export "figure_3_a.pdf", replace
graph export "figure_3_a.eps", replace

// Panel B
cd $dataset
use "dataset_border_1.dta", clear

foreach var of varlist unempchange60_50 ruralchange60_50 urbanchange60_50 familypovchange60_50 diffshareblack60_50 lndiff_pop_50_60 school_lowchange60_50 ch_cotton_sh_acre_59_55 ch_gb_tot_55_50 {

		quietly summarize `var'
		gen `var'_std = (`var' - r(mean)) / r(sd)
		twowayclusterBTF_withconst `var'_std literacy_nc , w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
		est sto `var'_std

}

coefplot (unempchange60_50_std, label({&Delta} Unemployment, 1960-1950) msymbol(O) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (familypovchange60_50_std, label({&Delta} Poverty, 1960-1950) msymbol(Oh) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (school_lowchange60_50_std, label({&Delta} Unskilled workers, 1960-1950) msymbol(S) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (ruralchange60_50_std, label({&Delta} Rural farm, 1960-1950) msymbol(Sh) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (ch_cotton_sh_acre_59_55_std, label({&Delta} Harvested cotton, 1959-1955) msymbol(D) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (diffshareblack60_50_std, label({&Delta} Black share, 1960-1950) msymbol(Dh) msize(medium) color(black)ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (lndiff_pop_50_60_std, label({&Delta} Population, 1960-1950) msymbol(T) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) (ch_gb_tot_55_50_std, label({&Delta} Green Book, 1955-1950) msymbol(Th) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) , ///
keep(literacy_nc) title() levels(95) ytitle("") xtitle("Coefficients") ylabel("") legend(rows(5) size(small) position(6) region(lcolor(white))) xline(0, lpattern(dash)) xlabels( , labs(medium) labgap() format(%9.1f)) graphregion(color(white)) xlabel(-1.0(0.5)1.0) xscale(range(-1.0(0.5)1.0))

cd $output
graph export "figure_3_b.pdf", replace
graph export "figure_3_b.eps", replace



/*
Figure 4. Local court cases
*/

// Panel A
cd $dataset
use "dataset_event_study_1.dta", clear

	xi, prefix(Tr): xtreg ln_votreg_white_pct_2yrs $time_court_cases $controls_figure_4 i.STATE*year [aweight=pop1960] , fe robust cluster(judicial_divisions_id)
	est sto est

	coefplot (est, ), keep( $plot_time_court_cases ) levels(95) ylabel(, nogrid) graphregion(color(white)) vertical xline(6, lwidth(0.2) lcolor(gray) lpattern(solid)) yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) format(%9.2f) msymbol(S) msize(medsmall) color(gs9) lwidth(thick) ciopts(recast(rcap) lcolor(gs9) lwidth(medthin)) citop yscale(range(-0.5 0.5)) ylabel(-0.5(0.25)0.5) ytitle("(ln) registration rate", size(medlarge)) xtitle("2-year periods from/since court case", size(medlarge)) title() omitted
cd $output
graph export "figure_4_a.pdf", replace
graph export "figure_4_a.eps", replace

// Panel B
cd $dataset
use "dataset_event_study_2.dta", clear

	xi, prefix(Tr): xtreg ln_votreg_white_pct_2yrs $time_court_cases $controls_figure_4 i.STATE*year [aweight=pop1960] , fe robust cluster(judicial_divisions_id)
	est sto est

	coefplot (est, ), keep( $plot_time_court_cases ) levels(95) ylabel(, nogrid) graphregion(color(white)) vertical xline(6, lwidth(0.2) lcolor(gray) lpattern(solid)) yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) format(%9.2f) msymbol(S) msize(medsmall) color(gs9) lwidth(thick) ciopts(recast(rcap) lcolor(gs9) lwidth(medthin)) citop yscale(range(-0.5 0.5)) ylabel(-0.5(0.25)0.5) ytitle("(ln) registration rate", size(medlarge)) xtitle("2-year periods from/since court case", size(medlarge)) title() omitted
cd $output
graph export "figure_4_b.pdf", replace
graph export "figure_4_b.eps", replace



/*
Figure 5. White registration and political competition
*/
cd $dataset
use "dataset_wide_1.dta", clear

binsreg ch_ln_votreg_white_pct_pres black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60 $controls_int ibn.STATE , vce(cluster judicial_divisions_id) nbins(4) dotsgrid(20) samebinsby binspos(es) dots(2,2) ci(2,2) cb(2,2) cbplotopt(acolor(gs9*1.5) fintensity(inten30)) bycolors(gs9) bysymbols(S) graphregion(color(white)) yscale(range(-0.5 2.5)) ylabel(-0.5(0.5)2.5, nogrid format(%9.1f)) yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) xscale(range(0 100)) xlabel(0 (20) 100, nogrid format(%9.0f)) ytitle("(ln) registration rate, 1980-1960") xtitle("Black share, 1960 X VRA X SMD")

cd $output
graph export "figure_5.pdf", replace
graph export "figure_5.eps", replace



/*
Figure 6. The local election of the first Black official
*/
cd $dataset
use "dataset_event_study_3.dta", clear

// Panel A
xi, prefix(Tr): xtreg ln_votreg_black_pct_2yrs $time_beo $controls_figure_6 i.STATE*year [aweight=pop1960] , fe robust cluster(judicial_divisions_id)
est sto est

coefplot (est, ), keep( $plot_time_beo ) levels(95) ylabel(, nogrid) graphregion(color(white)) vertical xline(6, lwidth(0.2) lcolor(gray) lpattern(solid)) yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) format(%9.1f) color(black) lwidth(thick) ciopts(recast(rcap) lcolor(black) lwidth(medthin)) citop yscale(range(-1.0 1.0)) ylabel(-1.0(0.5)1.0) ytitle("(ln) registration rate") xtitle("2-year periods from/since election") title() omitted

cd $output
graph export "figure_6_a.pdf", replace
graph export "figure_6_a.eps", replace


// Panel B
xi, prefix(Tr): xtreg ln_votreg_white_pct_2yrs $time_beo $controls_figure_6 i.STATE*year [aweight=pop1960] , fe robust cluster(judicial_divisions_id)
est sto est

coefplot (est, ), keep( $plot_time_beo ) levels(95) ylabel(, nogrid) graphregion(color(white)) vertical xline(6, lwidth(0.2) lcolor(gray) lpattern(solid)) 	yline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) format(%9.2f) msymbol(S) color(gs9) lwidth(thick) ciopts(recast(rcap) lcolor(gs9) lwidth(medthin)) citop yscale(range(-0.5 0.5)) ylabel(-0.5(0.25)0.5) ytitle("(ln) registration rate") xtitle("2-year periods from/since election") title() omitted

cd $output
graph export "figure_6_b.pdf", replace
graph export "figure_6_b.eps", replace



/*
Figure 7. Gallup data: Opposition to a Black president
*/
cd $dataset
use "dataset_gallup_1.dta", clear


reg y_black_pres p_VRA_SMD_bl p_VRA_SMD p_VRA_bl p_SMD_bl p_VRA p_SMD p_bl i.year i.state_fe $controls_figure_7 , robust
est sto p_VRA_SMD_bl

forvalues k = 0/1 {
foreach var in $gallup_interactions {
		reg y_black_pres p_VRA_SMD_bl p_VRA_SMD p_VRA_bl p_SMD_bl p_VRA p_SMD p_bl i.year i.state_fe $controls_figure_7 if `var' == `k' , robust
		est sto p_VRA_SMD_bl_`var'`k'
}
}

coefplot (p_VRA_SMD_bl \ p_VRA_SMD_bl_rural1 \ p_VRA_SMD_bl_rural0 \ p_VRA_SMD_bl_uned1 \ p_VRA_SMD_bl_uned0 \ p_VRA_SMD_bl_old1 \ p_VRA_SMD_bl_old0 \ p_VRA_SMD_bl_male1 \ p_VRA_SMD_bl_male0 , msymbol(O) msize(medium) color(black) ciopts(lwidth(*1.5) lcolor(black) recast(rcap))) , ///
keep(p_VRA_SMD_bl) aseq swapnames title() levels(95) legend(off) coeflabels(p_VRA_SMD_bl = "All White Respondents" p_VRA_SMD_bl_rural1 = "Rural" p_VRA_SMD_bl_rural0 = "Urban" p_VRA_SMD_bl_uned1 = "Low Education" p_VRA_SMD_bl_uned0 = "High School or Higher" p_VRA_SMD_bl_old1 = "Above 40 Years" p_VRA_SMD_bl_old0 = "Below 40 Years" p_VRA_SMD_bl_male1 = "Male" p_VRA_SMD_bl_male0 = "Female") xline(0, lwidth(0.2) lpattern(dash) lcolor(gray)) xlabels( , nogrid labs(medium) labgap() format(%9.3f)) ylabels( , nogrid) graphregion(color(white))

cd $output
graph export "figure_7.pdf", replace
graph export "figure_7.eps", replace




/*
Table 1. Summary statistics
*/

// Panel A
cd $dataset
use "dataset_summary_statistics_1.dta", clear

xi: estpost summarize $pol_par1960 if literacy_nc == 1
eststo pol_par_1_vot
xi: estpost summarize $pol_par1960 if literacy_nc == 0
eststo pol_par_2_vot
xi: estpost summarize $pol_par1980 if literacy_nc == 1
eststo pol_par_3_vot
xi: estpost summarize $pol_par1980 if literacy_nc == 0
eststo pol_par_4_vot
xi: estpost summarize $cou_cha_vot if literacy_nc == 1
eststo cou_cha_1_vot
xi: estpost summarize $cou_cha_vot if literacy_nc == 0
eststo cou_cha_2_vot

// Panel B
cd $dataset
use "dataset_summary_statistics_2.dta", clear

xi: estpost summarize $cou_cha_full if literacy_nc == 1
eststo cou_cha_1_full
xi: estpost summarize $cou_cha_full if literacy_nc == 0 
eststo cou_cha_2_full

// Table
cd $output

estout pol_par_1_vot pol_par_2_vot using summary_statistics_table_1.tex, replace type label cells("mean(fmt(1)) sd(fmt(1)) min(fmt(1)) max(fmt(1))") mlabels(none) collabels(none) varwidth(12) modelwidth(10) style(tex) title (Summary statistics \label{summary_statistics_table_1}) prehead("\begin{table}[pH] \begin{center} \setlength\tabcolsep{6.0pt}" "\caption{@title}\renewcommand{\arraystretch}{1.1}\footnotesize \begin{tabular}{@{}l c c c c c c c c} \toprule\midrule & \multicolumn{4}{c}{Covered Counties} & \multicolumn{4}{c}{Non-covered Counties} \\ \cmidrule(r){2-5} \cmidrule(r){6-9} & Mean & St. Dev. & Min & Max & Mean & St. Dev. & Min & Max \\ \midrule \multicolumn{4}{l}{\hspace{-0.3 cm} \emph{Panel A: Voter registration sample}} \\ \midrule \emph{Political participation in 1960} \\")

estout pol_par_3_vot pol_par_4_vot using summary_statistics_table_1.tex, append label cells("mean(fmt(1)) sd(fmt(1)) min(fmt(1)) max(fmt(1))") mlabels(none) collabels(none) varwidth(12) modelwidth(10) style(tex) posthead("\emph{Political participation in 1980} \\") postfoot(" ")

estout cou_cha_1_vot cou_cha_2_vot using summary_statistics_table_1.tex, append label cells("mean(fmt(1)) sd(fmt(1)) min(fmt(1)) max(fmt(1))") mlabels(none) collabels(none) varwidth(12) modelwidth(10) style(tex) posthead("\emph{County characteristics} \\") prefoot("") postfoot("\midrule \multicolumn{4}{l}{\hspace{-0.3 cm} \emph{Panel B: Full U.S. South sample}} \\ \midrule")

estout cou_cha_1_full cou_cha_2_full using summary_statistics_table_1.tex, append label cells("mean(fmt(1)) sd(fmt(1)) min(fmt(1)) max(fmt(1))") mlabels(none) collabels(none) varwidth(12) modelwidth(10) style(tex) posthead("\emph{County characteristics} \\") postfoot("\midrule \bottomrule \end{tabular} \end{center} \end{table}")



/*
Table 2. Change in (ln) registration rates, 1980-1960
*/
cd $dataset
use "dataset_border_2.dta", clear

// Panel A, Column 5
twowayclusterBTF_withconst ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 pair_fixedeffect_1-pair_fixedeffect_113 , w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
		est sto bl_grd

// Panel B, Column 5
twowayclusterBTF_withconst ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 pair_fixedeffect_1-pair_fixedeffect_113 , w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
		est sto wh_grd

cd $dataset
use "dataset_wide_2.dta", clear

// Panel A, Column 1
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_1

quietly summarize votreg_black_pct_presyears1960 [aweight=pop1960] if e(sample)
local y1_mn: dis %8.3fc r(mean)
local y1_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x1_mn: dis %8.3fc r(mean)
local x1_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel A, Column 2
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.school_low#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_2

quietly summarize votreg_black_pct_presyears1960 [aweight=pop1960] if e(sample)
local y2_mn: dis %8.3fc r(mean)
local y2_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x2_mn: dis %8.3fc r(mean)
local x2_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel A, Column 3
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.school_low#literacy_nc c.pro_black_county#literacy_nc c.anti_black_county#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_3

quietly summarize votreg_black_pct_presyears1960 [aweight=pop1960] if e(sample)
local y3_mn: dis %8.3fc r(mean)
local y3_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x3_mn: dis %8.3fc r(mean)
local x3_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel A, Column 4
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.school_low#literacy_nc c.pro_black_county#literacy_nc c.anti_black_county#literacy_nc c.gb_tot_1955_b#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_4

quietly summarize votreg_black_pct_presyears1960 [aweight=pop1960] if e(sample)
local y4_mn: dis %8.3fc r(mean)
local y4_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x4_mn: dis %8.3fc r(mean)
local x4_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel B, Column 1
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_1

quietly summarize votreg_white_pct_presyears1960 [aweight=pop1960] if e(sample)
local y5_mn: dis %8.3fc r(mean)
local y5_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x5_mn: dis %8.3fc r(mean)
local x5_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel B, Column 2
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.school_low#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_2

quietly summarize votreg_white_pct_presyears1960 [aweight=pop1960] if e(sample)
local y6_mn: dis %8.3fc r(mean)
local y6_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x6_mn: dis %8.3fc r(mean)
local x6_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel B, Column 3
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.school_low#literacy_nc c.pro_black_county#literacy_nc c.anti_black_county#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_3

quietly summarize votreg_white_pct_presyears1960 [aweight=pop1960] if e(sample)
local y7_mn: dis %8.3fc r(mean)
local y7_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x7_mn: dis %8.3fc r(mean)
local x7_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel B, Column 4
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 c.family_less_3000#literacy_nc c.unemp60#literacy_nc c.rural_farm60#literacy_nc c.cotton_share_acre#literacy_nc c.school_low#literacy_nc c.pro_black_county#literacy_nc c.anti_black_county#literacy_nc c.gb_tot_1955_b#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_4

quietly summarize votreg_white_pct_presyears1960 [aweight=pop1960] if e(sample)
local y8_mn: dis %8.3fc r(mean)
local y8_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x8_mn: dis %8.3fc r(mean)
local x8_sd = "(" + string(r(sd), "%8.3fc") + ")"


cd $dataset
merge 1:m county using "dataset_border_2.dta", force
keep if _merge == 3
drop _merge

quietly summarize votreg_black_pct_presyears1960 [aweight=pop1960] if e(sample)
local y70_mn: dis %8.3fc r(mean)
local y70_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x70_mn: dis %8.3fc r(mean)
local x70_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize votreg_white_pct_presyears1960 [aweight=pop1960] if e(sample)
local y71_mn: dis %8.3fc r(mean)
local y71_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x71_mn: dis %8.3fc r(mean)
local x71_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Table
cd $output

estout bl_1 bl_2 bl_3 bl_4 bl_grd using from_ES_to_full.tex, replace type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(black_share60_lit_nc black_share60) order(black_share60_lit_nc black_share60) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\begin{table}[ph!] \begin{center} \setlength\tabcolsep{12.0pt} \caption{Change in (ln) registration rates, 1980-1960} \label{from_ES_to_full} \begin{threeparttable}\renewcommand{\arraystretch}{0.8}\footnotesize \begin{tabular}{p{0.21\textwidth}>{\centering}p{0.09\textwidth}>{\centering}p{0.09\textwidth}>{\centering}p{0.09\textwidth}>{\centering}p{0.09\textwidth}>{\centering\arraybackslash}p{0.09\textwidth}} \toprule\midrule \textit{Dep. variable:} & \multicolumn{5}{c}{(ln) Registration Rates} \\ \cmidrule(r){2-5} \cmidrule(r){6-6} & \multicolumn{1}{c}{Event} & \multicolumn{1}{c}{Less Than} & \multicolumn{1}{c}{Pro-, Anti-} & \multicolumn{1}{c}{Green} & \multicolumn{1}{c}{Border} \\ & \multicolumn{1}{c}{Study} & \multicolumn{1}{c}{High School} & \multicolumn{1}{c}{Black Protests} & \multicolumn{1}{c}{Books} & \multicolumn{1}{c}{GRD} \\ \addlinespace & (1) & (2) & (3) & (4) & (5) \\ \midrule \multicolumn{6}{l}{\emph{Panel A: Black registration}} \\ \midrule" ) prefoot("\textit{Summary statistics:} \\ \midrule Dep. variable &`y1_mn'&`y2_mn'&`y3_mn'&`y4_mn'&`y70_mn' \\ &`y1_sd'&`y2_sd'&`y3_sd'&`y4_sd'&`y70_sd' \\ \addlinespace Black share, 1960 &`x1_mn'&`x2_mn'&`x3_mn'&`x4_mn'&`x70_mn' \\ &`x1_sd'&`x2_sd'&`x3_sd'&`x4_sd'&`x70_sd' \\ \midrule \addlinespace \addlinespace")

estout wh_1 wh_2 wh_3 wh_4 wh_grd using from_ES_to_full.tex, append type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(black_share60_lit_nc black_share60) order(black_share60_lit_nc black_share60) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\addlinespace \midrule \multicolumn{6}{l}{\emph{Panel B: White registration}} \\ \midrule" ) prefoot("\textit{Summary statistics:} \\ \midrule Dep. variable &`y5_mn'&`y6_mn'&`y7_mn'&`y8_mn'&`y71_mn' \\ &`y5_sd'&`y6_sd'&`y7_sd'&`y8_sd'&`y71_sd' \\ \addlinespace Black share, 1960 &`x5_mn'&`x6_mn'&`x7_mn'&`x8_mn'&`x71_mn' \\ &`x5_sd'&`x6_sd'&`x7_sd'&`x8_sd'&`x71_sd' \\ \midrule \addlinespace \addlinespace") postfoot("\midrule \bottomrule\end{tabular} \begin{tablenotes}[flushleft] \scriptsize \item \leavevmode\kern-\scriptspace\kern-\labelsep Notes: The table estimates the long difference model in equation \eqref{longdiff}. The dependent variable is the 1980-1960 change in the log of registration rates in Panels A and B. All regressions include state dummies, the 1960 Black population share, and its interaction with the coverage (VRA) dummy. Regressions also include interactions between county controls and the coverage (VRA) dummy. Controls in column (1) are: Unemployment rate (\%), 1960; Families below poverty line (\%), 1960; Rural farms (\%), 1960; Land devoted to harvested cotton (\%), 1959. Controls are added sequentially across columns: Low-skilled (\%), 1960 in column (2); Pro-Black protest, 1960-64 and Anti-Black protest, 1960-64 in column (3); Green Book establishments, 1955 in column (4). Column (5) replicates the long difference model in equation \eqref{longdiff} using the GRD design of equation \eqref{GRDspec} and restricting the sample to contiguous counties that belong to covered and non-covered states. In column (5), all regressions also include county pair trends, the 1960 Black population share, and its interaction with the coverage (VRA) dummy. In columns (1) to (4) (resp., column 5) regressions are weighed by 1960 population (resp., by the inverse of the counties' appearance in the sample), and robust standard errors in parenthesis are adjusted for clustering by judicial divisions (resp., by judicial divisions and border segments). ***, **, and * indicate statistical significance at the 1\%, 5\%, and 10\% levels, respectively.\end{tablenotes} \end{threeparttable} \end{center} \end{table}")



/*
Table 3. Pre-VRA trends
*/

// Panel A
cd $dataset
use "dataset_pre_trends_1.dta", clear

xi: reg ch_kkk_66_40_pcw black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo ch_kkk_66_40_pcw_t

quietly summarize kkk_klavern_15_40_pcw if e(sample)
local y1_mn: dis %8.3fc r(mean)
local y1_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x1_mn: dis %8.3fc r(mean)
local x1_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg ch_black_lynching60_40 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo ch_black_lynching60_40_t

quietly summarize black_lynching_1930_1940 if e(sample)
local y2_mn: dis %8.3fc r(mean)
local y2_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x2_mn: dis %8.3fc r(mean)
local x2_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg ch_cotton_share_acre_59_49 black_share60_lit_nc black_share60 $controls_table_3_no_cotton ibn.STATE , robust cluster(judicial_divisions_id)
eststo ch_cotton_sh_land_64_55_t

quietly summarize cotton_share_acre_1949 if e(sample)
local y3_mn: dis %8.3fc r(mean)
local y3_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x3_mn: dis %8.3fc r(mean)
local x3_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg ch_naacp_64_42_pcb black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo ch_naacp_64_42_pcb_t

quietly summarize naacp_branch_1942_pcb if e(sample)
local y4_mn: dis %8.3fc r(mean)
local y4_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x4_mn: dis %8.3fc r(mean)
local x4_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_rep_share_64_40 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_rep_share_64_40_t

quietly summarize rep_share_1952 if e(sample)
local y5_mn: dis %8.3fc r(mean)
local y5_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x5_mn: dis %8.3fc r(mean)
local x5_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_rep_share_60_40 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_rep_share_60_40_t

quietly summarize rep_share_1940 if e(sample)
local y6_mn: dis %8.3fc r(mean)
local y6_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x6_mn: dis %8.3fc r(mean)
local x6_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_pop_50_60 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_pop_50_60_t

quietly summarize population50_1000 if e(sample)
local y7_mn: dis %8.3fc r(mean)
local y7_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x7_mn: dis %8.3fc r(mean)
local x7_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg ch_black_share_60_50 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo ch_black_share_60_50_t

quietly summarize black_share50 if e(sample)
local y8_mn: dis %8.3fc r(mean)
local y8_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x8_mn: dis %8.3fc r(mean)
local x8_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_tnt_pres_60_40 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_tnt_pres_60_40_t

quietly summarize tnt_pres_tot_1940 if e(sample)
local y9_mn: dis %8.3fc r(mean)
local y9_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x9_mn: dis %8.3fc r(mean)
local x9_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_tnt_gov_60_40 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_tnt_gov_60_40_t

quietly summarize tnt_gov_1940 if e(sample)
local y10_mn: dis %8.3fc r(mean)
local y10_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x10_mn: dis %8.3fc r(mean)
local x10_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_winner_gov black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_winner_gov_t

quietly summarize winner_gov_40 if e(sample)
local y11_mn: dis %8.3fc r(mean)
local y11_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x11_mn: dis %8.3fc r(mean)
local x11_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_lower_60_50 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_lower_60_50_t

quietly summarize lower_50 if e(sample)
local y12_mn: dis %8.3fc r(mean)
local y12_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x12_mn: dis %8.3fc r(mean)
local x12_sd = "(" + string(r(sd), "%8.3fc") + ")"

xi: reg lndiff_upper_60_50 black_share60_lit_nc black_share60 $controls_table_3 ibn.STATE , robust cluster(judicial_divisions_id)
eststo lndiff_upper_60_50_t

quietly summarize upper_50 if e(sample)
local y13_mn: dis %8.3fc r(mean)
local y13_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 if e(sample)
local x13_mn: dis %8.3fc r(mean)
local x13_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel B
cd $dataset
use "dataset_pre_trends_2.dta", clear

twowayclusterBTF_withconst ch_kkk_66_40_pcw black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo ch_kkk_66_40_pcw_b_t

quietly summarize kkk_klavern_15_40_pcw
local y14_mn: dis %8.3fc r(mean)
local y14_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x14_mn: dis %8.3fc r(mean)
local x14_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst ch_black_lynching60_40 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo ch_black_lynching60_40_b_t

quietly summarize black_lynching_1930_1940
local y15_mn: dis %8.3fc r(mean)
local y15_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x15_mn: dis %8.3fc r(mean)
local x15_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst ch_cotton_share_acre_59_49 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo ch_cotton_sh_land_64_55_b_t

quietly summarize cotton_share_acre_1949
local y16_mn: dis %8.3fc r(mean)
local y16_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x16_mn: dis %8.3fc r(mean)
local x16_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst ch_naacp_64_42_pcb black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo ch_naacp_64_42_pcb_b_t

quietly summarize naacp_branch_1942_pcb
local y17_mn: dis %8.3fc r(mean)
local y17_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x17_mn: dis %8.3fc r(mean)
local x17_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_rep_share_64_40 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_rep_share_64_40_b_t

quietly summarize rep_share_1952
local y18_mn: dis %8.3fc r(mean)
local y18_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x18_mn: dis %8.3fc r(mean)
local x18_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_rep_share_60_40 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_rep_share_60_40_b_t

quietly summarize rep_share_1940
local y19_mn: dis %8.3fc r(mean)
local y19_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x19_mn: dis %8.3fc r(mean)
local x19_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_pop_50_60 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_pop_50_60_b_t

quietly summarize population50_1000
local y20_mn: dis %8.3fc r(mean)
local y20_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x20_mn: dis %8.3fc r(mean)
local x20_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst ch_black_share_60_50 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo ch_black_share_60_50_b_t

quietly summarize black_share50
local y21_mn: dis %8.3fc r(mean)
local y21_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x21_mn: dis %8.3fc r(mean)
local x21_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_tnt_pres_60_40 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_tnt_pres_60_40_b_t

quietly summarize tnt_pres_tot_1940
local y22_mn: dis %8.3fc r(mean)
local y22_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x22_mn: dis %8.3fc r(mean)
local x22_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_tnt_gov_60_40 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_tnt_gov_60_40_b_t

quietly summarize tnt_gov_1940
local y23_mn: dis %8.3fc r(mean)
local y23_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x23_mn: dis %8.3fc r(mean)
local x23_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_winner_gov black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_winner_gov_b_t

quietly summarize winner_gov_40
local y24_mn: dis %8.3fc r(mean)
local y24_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x24_mn: dis %8.3fc r(mean)
local x24_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_lower_60_50 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_lower_60_50_b_t

quietly summarize lower_50
local y25_mn: dis %8.3fc r(mean)
local y25_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x25_mn: dis %8.3fc r(mean)
local x25_sd = "(" + string(r(sd), "%8.3fc") + ")"

twowayclusterBTF_withconst lndiff_upper_60_50 black_share60_lit_nc black_share60 literacy_nc pair_fixedeffect_1-pair_fixedeffect_113, w(county_w) fcluster(judicial_border) tcluster(judicial_divisions_id)
eststo lndiff_upper_60_50_b_t

quietly summarize upper_50
local y26_mn: dis %8.3fc r(mean)
local y26_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60
local x26_mn: dis %8.3fc r(mean)
local x26_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Table
cd $output

estout ch_kkk_66_40_pcw_t ch_black_lynching60_40_t ch_cotton_sh_land_64_55_t ch_naacp_64_42_pcb_t lndiff_rep_share_64_40_t lndiff_rep_share_60_40_t lndiff_tnt_pres_60_40_t lndiff_tnt_gov_60_40_t lndiff_winner_gov_t lndiff_lower_60_50_t lndiff_upper_60_50_t using pre_trends_vot_reg_sample.tex, stats(r2_a  N, fmt(3 0) labels("Adj. R-Square" "N")) rename (0.literacy_nc#c.unemp60 unemp60_n 0.literacy_nc#c.pop60 pop60_n 0.literacy_nc#c.family_less_3000 family_less_3000_n 0.literacy_nc#c.school_low school_low_n 0.literacy_nc#c.urbanB60 urbanB60_n  0.literacy_nc#c.pro_black_county pro_black_county_n 0.literacy_nc#c.cotton_suitability cotton_suitability_n 0.literacy_nc#c.anti_black_county anti_black_county_n) keep(black_share60_lit_nc black_share60) order(black_share60_lit_nc black_share60) cells("b(star label( ) fmt(3))" " se(par label( ) fmt(3))") replace mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth(10) style(tex) prehead("\begin{landscape} \begin{table}[!h]\begin{center} \begin{adjustbox}{scale=1} \setlength\tabcolsep{5.0pt} \begin{threeparttable} \caption{Pre-VRA trends} \label{pretrend1} \renewcommand{\arraystretch}{0.8}\scriptsize \begin{tabular}{@{}l c c c c c c c c c c c} \toprule\midrule \textit{Dep. variable:} & KKK & Lynching & Cotton & NAACP & Goldwater & Republican & President & Governor & Governor & State & State \\ & & & & & & Party & Turnout & Turnout & Win & House & Senate \\ & (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) \\ \midrule \emph{Panel A: Voter registration sample} \\ \midrule") prefoot("\textit{Summary statistics:} \\ \midrule Dep. variable &`y1_mn'&`y2_mn'&`y3_mn'&`y4_mn'&`y5_mn'&`y6_mn'&`y9_mn'&`y10_mn'&`y11_mn'&`y12_mn'&`y13_mn' \\ &`y1_sd'&`y2_sd'&`y3_sd'&`y4_sd'&`y5_sd'&`y6_sd'&`y9_sd'&`y10_sd'&`y11_sd'&`y12_sd'&`y13_sd' \\ \addlinespace Black share, 1960 &`x1_mn'&`x2_mn'&`x3_mn'&`x4_mn'&`x5_mn'&`x6_mn'&`x9_mn'&`x10_mn'&`x11_mn'&`x12_mn'&`x13_mn' \\ &`x1_sd'&`x2_sd'&`x3_sd'&`x4_sd'&`x5_sd'&`x6_sd'&`x9_sd'&`x10_sd'&`x11_sd'&`x12_sd'&`x13_sd' \\ \midrule \addlinespace\addlinespace ")

estout ch_kkk_66_40_pcw_b_t ch_black_lynching60_40_b_t ch_cotton_sh_land_64_55_b_t ch_naacp_64_42_pcb_b_t lndiff_rep_share_64_40_b_t lndiff_rep_share_60_40_b_t lndiff_tnt_pres_60_40_b_t lndiff_tnt_gov_60_40_b_t lndiff_winner_gov_b_t lndiff_lower_60_50_b_t lndiff_upper_60_50_b_t using pre_trends_vot_reg_sample.tex, append type stats(r2_a  N, fmt(3 0) labels("Adj. R-Square" "N")) keep(black_share60_lit_nc black_share60) order(black_share60_lit_nc black_share60) cells("b(star label( ) fmt(3))" " se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth(10) style(tex) prehead("\addlinespace \midrule \emph{Panel B: Border sample} \\ \midrule") prefoot("\textit{Summary statistics:} \\ \midrule Dep. variable &`y14_mn'&`y15_mn'&`y16_mn'&`y17_mn'&`y18_mn'&`y19_mn'&`y22_mn'&`y23_mn'&`y24_mn'&`y25_mn'&`y26_mn' \\ &`y14_sd'&`y15_sd'&`y16_sd'&`y17_sd'&`y18_sd'&`y19_sd'&`y22_sd'&`y23_sd'&`y24_sd'&`y25_sd'&`y26_sd' \\ \addlinespace Black share, 1960 &`x14_mn'&`x15_mn'&`x16_mn'&`x17_mn'&`x18_mn'&`x19_mn'&`x22_mn'&`x23_mn'&`x24_mn'&`x25_mn'&`x26_mn' \\ &`x14_sd'&`x15_sd'&`x16_sd'&`x17_sd'&`x18_sd'&`x19_sd'&`x22_sd'&`x23_sd'&`x24_sd'&`x25_sd'&`x26_sd' \\ \midrule \addlinespace\addlinespace ") postfoot("\midrule \bottomrule\end{tabular} \begin{tablenotes}[flushleft] \scriptsize \item \leavevmode\kern-\scriptspace\kern-\labelsep Notes: The table estimates the long difference model in equation \eqref{longdiff} using as outcome the change in the variable at the top of each column. All changes refer to 1960-1940, except for column (1) (1966-1940), column (3) (1959-1949), column (4) (1964-1942), column (5) (1964-1940), columns (10) and (11) (1960-1950). All regressions include state dummies, the 1960 Black population share, and its interaction with the coverage (VRA) dummy. Controls in Panel A are: Low-skilled (\%), 1960; Unemployment rate (\%), 1960; Families below poverty line (\%), 1960; Rural farms (\%), 1960; Land devoted to harvested cotton (\%), 1959; Pro-Black protest, 1960-64; Anti-Black protest, 1960-64; Green Book establishments, 1955. Land devoted to harvested cotton (\%), 1959 is not included as a control in column (3). The sample of Panel A is based on the availability of voter registration data. Robust standard errors in parenthesis are adjusted for clustering by judicial divisions in Panel A, and by judicial divisions and border segments in Panel B. ***, **, and * indicate statistical significance at the 1\%, 5\%, and 10\% levels, respectively. \end{tablenotes}\end{threeparttable} \end{adjustbox} \end{center} \end{table} \end{landscape}")


/*
Table 4. Electoral rules and registration rates
*/
cd $dataset
use "dataset_wide_2.dta", clear

// Table 4, column 1
xi: reg ch_ShareBl_CountyGoverningBody black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE , nocon robust cluster(judicial_divisions_id)
eststo smd_1_beo

quietly summarize ShareBl_CountyGoverningBody_1964 [aweight=pop1960] if e(sample)
local y1_mn: dis %8.3fc r(mean)
local y1_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x1_mn: dis %8.3fc r(mean)
local x1_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Table 4, column 2
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
eststo smd_1_vot_reg_black

quietly summarize votreg_black_pct_presyears1960 [aweight=pop1960] if e(sample)
local y2_mn: dis %8.3fc r(mean)
local y2_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x2_mn: dis %8.3fc r(mean)
local x2_sd = "(" + string(r(sd), "%8.3fc") + ")"

// White voter registration
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
eststo smd_1_vot_reg_white

quietly summarize votreg_white_pct_presyears1960 [aweight=pop1960] if e(sample)
local y3_mn: dis %8.3fc r(mean)
local y3_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x3_mn: dis %8.3fc r(mean)
local x3_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Table
cd $output
estout smd_1_beo smd_1_vot_reg_black smd_1_vot_reg_white using longrun_smd.tex, replace type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60) order(black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\begin{table}[ph!] \begin{center} \setlength\tabcolsep{6.0pt} \caption{Electoral rules and registration rates} \label{long_run_smd} \begin{threeparttable}\renewcommand{\arraystretch}{0.8}\small \begin{tabular}{p{0.35\textwidth}>{\centering}p{0.17\textwidth}>{\centering}p{0.17\textwidth}>{\centering\arraybackslash}p{0.17\textwidth}} \toprule\midrule \textit{Dep. variable:} & \multicolumn{1}{c}{Elections} & \multicolumn{2}{c}{(ln) Registration Rates} \\ \cmidrule(r){2-2} \cmidrule(r){3-4} & \multicolumn{1}{c}{County} & \multicolumn{1}{c}{Black} & \multicolumn{1}{c}{White} \\ & \multicolumn{1}{c}{Governing} & & \\ & \multicolumn{1}{c}{Bodies} & & \\ \addlinespace & (1) & (2) & (3) \\ \midrule" ) prefoot("\textit{Summary statistics:} \\ \midrule Dep. variable & `y1_mn' & `y2_mn' & `y3_mn' \\ & `y1_sd' & `y2_sd' & `y3_sd' \\ \addlinespace Black share, 1960 & `x1_mn' & `x2_mn' & `x3_mn' \\ & `x1_sd' & `x2_sd' & `x3_sd' \\ \midrule \addlinespace \addlinespace") postfoot("\midrule \bottomrule\end{tabular} \begin{tablenotes}[flushleft] \scriptsize \item \leavevmode\kern-\scriptspace\kern-\labelsep Notes: The table replicates the long difference model in equation \eqref{longdiff} augmented with the triple interaction between the 1960 Black population share, the coverage (VRA) dummy, and an indicator equal to one if the county belongs to a state with SMD electoral rules. The dependent variable is: i) the 1980-1964 change in the share of Black officials elected in county governing bodies in column (1); ii) the 1980-1960 change in Black (resp., white) log registration rates in column (2) (resp., column 3). All regressions include state dummies, the 1960 Black population share, and its interaction with the coverage (VRA) dummy. Regressions also include interactions between county controls and the coverage (VRA) dummy. Controls are: Low-skilled (\%), 1960; Unemployment rate (\%), 1960; Families below poverty line (\%), 1960; Rural farms (\%), 1960; Land devoted to harvested cotton (\%), 1959; Pro-Black protest, 1960-64; Anti-Black protest, 1960-64; Green Book establishments, 1955. Regressions are weighed by 1960 population, and robust standard errors in parenthesis are adjusted for clustering by judicial divisions. ***, **, and * indicate statistical significance at the 1\%, 5\%, and 10\% levels, respectively.\end{tablenotes} \end{threeparttable} \end{center} \end{table}")



/*
Table 5. Newspapers in gubernatorial elections
*/

cd $dataset
use "dataset_newspapers_1.dta", clear

// Column 1
reg st_negro_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 1 , robust cluster(judicial_divisions_id)
est store negro_and1

quietly summarize st_negro_and [aweight=pop1960] if e(sample)
local y1_mn: dis %8.3fc r(mean)
local y1_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x1_mn: dis %8.3fc r(mean)
local x1_sd = "(" + string(r(sd), "%8.3fc") + ")"

reg st_negro_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 0 , robust cluster(judicial_divisions_id)
est store negro_and0

quietly summarize st_negro_and [aweight=pop1960] if e(sample)
local y2_mn: dis %8.3fc r(mean)
local y2_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x2_mn: dis %8.3fc r(mean)
local x2_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Column 2
reg st_ng_fs_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 1 , robust cluster(judicial_divisions_id)
est store ng_fs_and1

quietly summarize st_ng_fs_and [aweight=pop1960] if e(sample)
local y3_mn: dis %8.3fc r(mean)
local y3_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x3_mn: dis %8.3fc r(mean)
local x3_sd = "(" + string(r(sd), "%8.3fc") + ")"

reg st_ng_fs_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 0 , robust cluster(judicial_divisions_id)
est store ng_fs_and0

quietly summarize st_ng_fs_and [aweight=pop1960] if e(sample)
local y4_mn: dis %8.3fc r(mean)
local y4_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x4_mn: dis %8.3fc r(mean)
local x4_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Column 3
reg st_whitebacklash_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 1 , robust cluster(judicial_divisions_id)
est store whitebacklash_and1
quietly summarize st_whitebacklash_and [aweight=pop1960] if e(sample)
local y5_mn: dis %8.3fc r(mean)
local y5_sd = "(" + string(r(sd), "%8.3fc") + ")"

quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x5_mn: dis %8.3fc r(mean)
local x5_sd = "(" + string(r(sd), "%8.3fc") + ")"

reg st_whitebacklash_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 0 , robust cluster(judicial_divisions_id)
est store whitebacklash_and0

quietly summarize st_whitebacklash_and [aweight=pop1960] if e(sample)
local y6_mn: dis %8.3fc r(mean)
local y6_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x6_mn: dis %8.3fc r(mean)
local x6_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Column 4
reg st_whitemobilization_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 1 , robust cluster(judicial_divisions_id)
est store whitemobilization_and1

quietly summarize st_whitemobilization_and [aweight=pop1960] if e(sample)
local y7_mn: dis %8.3fc r(mean)
local y7_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x7_mn: dis %8.3fc r(mean)
local x7_sd = "(" + string(r(sd), "%8.3fc") + ")"

reg st_whitemobilization_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 0 , robust cluster(judicial_divisions_id)
est store whitemobilization_and0

quietly summarize st_whitemobilization_and [aweight=pop1960] if e(sample)
local y8_mn: dis %8.3fc r(mean)
local y8_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x8_mn: dis %8.3fc r(mean)
local x8_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Column 5
reg st_whitemob_wallace_negro_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 1 , robust cluster(judicial_divisions_id)
est store whitemob_wallace_negro_and1

quietly summarize st_whitemob_wallace_negro_and [aweight=pop1960] if e(sample)
local y9_mn: dis %8.3fc r(mean)
local y9_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x9_mn: dis %8.3fc r(mean)
local x9_sd = "(" + string(r(sd), "%8.3fc") + ")"

reg st_whitemob_wallace_negro_and p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 0 , robust cluster(judicial_divisions_id)
est store whitemob_wallace_negro_and0

quietly summarize st_whitemob_wallace_negro_and [aweight=pop1960] if e(sample)
local y10_mn: dis %8.3fc r(mean)
local y10_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x10_mn: dis %8.3fc r(mean)
local x10_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Column 6
reg st_whitemob_wallace_negro_ng p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 1 , robust cluster(judicial_divisions_id)
est store whitemob_wallace_negro_ng1

quietly summarize st_whitemob_wallace_negro_ng [aweight=pop1960] if e(sample)
local y11_mn: dis %8.3fc r(mean)
local y11_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x11_mn: dis %8.3fc r(mean)
local x11_sd = "(" + string(r(sd), "%8.3fc") + ")"

reg st_whitemob_wallace_negro_ng p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 0 , robust cluster(judicial_divisions_id)
est store whitemob_wallace_negro_ng0

quietly summarize st_whitemob_wallace_negro_ng [aweight=pop1960] if e(sample)
local y12_mn: dis %8.3fc r(mean)
local y12_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x12_mn: dis %8.3fc r(mean)
local x12_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Test of equality, must be estimated without cluster and then add cluster with suest
foreach x in negro_and ng_fs_and whitebacklash_and whitemobilization_and whitemob_wallace_negro_and whitemob_wallace_negro_ng {
		reg st_`x' p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 0
		est store `x'a
		reg st_`x' p_vra_bl p_literacy_nc p_black_share60 i.year#i.statefip $controls_table_5 [aweight=pop1960] if gov_election_year_state == 1
		est store `x'b
}

suest negro_andb negro_anda, vce(cluster judicial_divisions_id)
test [negro_andb_mean = negro_anda_mean]: p_vra_bl
suest ng_fs_andb ng_fs_anda, vce(cluster judicial_divisions_id)
test [ng_fs_andb_mean = ng_fs_anda_mean]: p_vra_bl
suest whitebacklash_andb whitebacklash_anda, vce(cluster judicial_divisions_id)
test [whitebacklash_andb_mean = whitebacklash_anda_mean]: p_vra_bl
suest whitemobilization_andb whitemobilization_anda, vce(cluster judicial_divisions_id)
test [whitemobilization_andb_mean = whitemobilization_anda_mean]: p_vra_bl
suest whitemob_wallace_negro_andb whitemob_wallace_negro_anda, vce(cluster judicial_divisions_id)
test [whitemob_wallace_negro_andb_mean = whitemob_wallace_negro_anda_mean]: p_vra_bl
suest whitemob_wallace_negro_ngb whitemob_wallace_negro_nga, vce(cluster judicial_divisions_id)
test [whitemob_wallace_negro_ngb_mean = whitemob_wallace_negro_nga_mean]: p_vra_bl


// Table
cd $output

estout negro_and1 ng_fs_and1 whitebacklash_and1 whitemobilization_and1 whitemob_wallace_negro_and1 whitemob_wallace_negro_ng1 using newspapers_triple_frequency.tex, replace type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(p_vra_bl) order(p_vra_bl) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\begin{table}[ph!] \begin{center} \setlength\tabcolsep{6.0pt} \caption{Newspapers in gubernatorial elections} \label{newspapers_triple_frequency} \begin{threeparttable}\renewcommand{\arraystretch}{0.8}\footnotesize \begin{tabular}{p{0.28\textwidth}>{\centering}p{0.09\textwidth}>{\centering}p{0.09\textwidth}>{\centering}p{0.09\textwidth}>{\centering}p{0.09\textwidth}>{\centering}p{0.09\textwidth}>{\centering\arraybackslash}p{0.09\textwidth}} \toprule\midrule \textit{Dep. variable:} & \multicolumn{6}{c}{Newspapers} \\ \cmidrule(r){2-7} & Negro & Negro, & White, & White, & \multicolumn{2}{c}{White Mobilization,} \\ & & Disparaging & Backlash & Mobilization & \multicolumn{2}{c}{Wallace, Negro} \\ \cmidrule(r){6-7} & & & & & / And & / Negro \\ \addlinespace & (1) & (2) & (3) & (4) & (5) & (6) \\ \midrule \multicolumn{6}{l}{\emph{Panel A: Years with Gubernatorial Elections}} \\ \midrule") prefoot("\textit{Summary statistics:} \\ \midrule Black share, 1960 &`x1_mn'&`x3_mn'&`x5_mn'&`x7_mn'&`x9_mn'&`x11_mn' \\ &`x1_sd'&`x3_sd'&`x5_sd'&`x7_sd'&`x9_sd'&`x11_sd' \\ \midrule \addlinespace\addlinespace ")

estout negro_and0 ng_fs_and0 whitebacklash_and0 whitemobilization_and0 whitemob_wallace_negro_and0 whitemob_wallace_negro_ng0 using newspapers_triple_frequency.tex, append type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(p_vra_bl) order(p_vra_bl) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\addlinespace \midrule \multicolumn{6}{l}{\emph{Panel B: Years without Gubernatorial Elections}} \\ \midrule") prefoot("\textit{Summary statistics:} \\ \midrule Black share, 1960 &`x2_mn'&`x4_mn'&`x6_mn'&`x8_mn'&`x10_mn'&`x12_mn' \\ &`x2_sd'&`x4_sd'&`x6_sd'&`x8_sd'&`x10_sd'&`x12_sd' \\ \midrule \addlinespace\addlinespace ") postfoot("\addlinespace \midrule \multicolumn{4}{l}{\emph{Panel C: Difference in Coefficients (Panels A -- B)}} \\ \midrule P-value (Panels A -- B) & 0.456 &  0.789 & 0.161 & 0.130 & 0.023 & 0.016 \\" "\midrule\bottomrule\end{tabular} \begin{tablenotes}[flushleft] \scriptsize \item \leavevmode\kern-\scriptspace\kern-\labelsep Notes: The table includes the interaction between the post-VRA dummy, the VRA indicator, and the 1960 Black population share in models that also include: county and state by year fixed effects; and interactions between the post-VRA dummy, the VRA indicator, and the vector of baseline controls. The dependent variable is: the frequency of the word Negro, scaled by And (column 1); the joint frequency of the word Negro with four disparaging terms associated with violence and crime, scaled by the frequency of the word And (column 2); the joint frequency of the words White and Backlash, scaled by the frequency of the word And (column 3); the joint frequency of the words White and Mobilization, scaled by the frequency of the word And (column 4); the joint frequency of the words White Mobilization, Wallace, and Negro, scaled by the frequency of the word And (column 5) and Negro (column 6). The sample is split into years with and without gubernatorial elections between 1960 and 1970 in Panels A and B, respectively. Controls are: Low-skilled (\%), 1960; Unemployment rate (\%), 1960; Families below poverty line (\%), 1960; Rural farms (\%), 1960; Land devoted to harvested cotton (\%), 1959; Pro-Black protest, 1960-64; Anti-Black protest, 1960-64; Green Book establishments, 1955. Regressions are weighed by 1960 population, and robust standard errors in parenthesis are adjusted for clustering by judicial divisions. ***, **, and * indicate statistical significance at the 1\%, 5\%, and 10\% levels, respectively.\end{tablenotes} \end{threeparttable} \end{center} \end{table}")



/*
Table 6. Change in (ln) registration rates, 1980-1960
*/
cd $dataset
use "dataset_education_1.dta", clear

// Column 1
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 $controls_table_6 c.sh_bl_less_high_school#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_4

// Column 2
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 $controls_table_6 c.bl_less_5_years#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_6

// Column 3
xi: reg ch_ln_votreg_black_pct_pres black_share60_lit_nc black_share60 $controls_table_6 c.illit_bl_1960#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_8

quietly summarize votreg_black_pct_presyears1960 [aweight=pop1960] if e(sample)
local y1_mn: dis %8.3fc r(mean)
local y1_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x1_mn: dis %8.3fc r(mean)
local x1_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Column 1
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 $controls_table_6 c.sh_wh_less_high_school#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_5

// Column 2
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 $controls_table_6 c.wh_less_5_years#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_7

// Column 3
xi: reg ch_ln_votreg_white_pct_pres black_share60_lit_nc black_share60 $controls_table_6 c.illit_wh_1960#literacy_nc ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_9

quietly summarize votreg_white_pct_presyears1960 [aweight=pop1960] if e(sample)
local y2_mn: dis %8.3fc r(mean)
local y2_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x2_mn: dis %8.3fc r(mean)
local x2_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Column 4
xi: reg ch_ln_votreg_black_pct_pres bl_less_5_years_blsh60_lit bl_less_5_years_blsh60 bl_less_5_years_lit black_share60_lit_nc bl_less_5_years black_share60 $controls_table_6 ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto bl_less_quad

// Column 4
xi: reg ch_ln_votreg_white_pct_pres wh_less_5_years_blsh60_lit wh_less_5_years_blsh60 wh_less_5_years_lit black_share60_lit_nc wh_less_5_years black_share60 $controls_table_6 ibn.STATE [aweight=pop1960], nocon robust cluster(judicial_divisions_id)
est sto wh_less_quad

// Table
cd $output
estout bl_4 bl_6 bl_8 bl_less_quad using education_1960.tex, replace type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(black_share60_lit_nc black_share60 bl_less_5_years_blsh60_lit) order(black_share60_lit_nc black_share60 bl_less_5_years_blsh60_lit) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\begin{table}[ph!] \begin{center} \setlength\tabcolsep{6.0pt} \caption{Change in (ln) registration rates, 1980-1960} \label{education_1960} \begin{threeparttable}\renewcommand{\arraystretch}{0.8}\small \begin{tabular}{p{0.43\textwidth}>{\centering}p{0.11\textwidth}>{\centering}p{0.11\textwidth}>{\centering}p{0.11\textwidth}>{\centering\arraybackslash}p{0.11\textwidth}} \toprule\midrule \textit{Dep. variable:} & \multicolumn{4}{c}{(ln) Registration Rates} \\ \cmidrule(r){2-5} & \multicolumn{4}{c}{Same Race} \\ \cmidrule(r){2-4} \cmidrule(r){5-5} & \multicolumn{1}{c}{Less Than} & \multicolumn{1}{c}{Less Than} & \multicolumn{1}{c}{No} & \multicolumn{1}{c}{Less Than} \\ & \multicolumn{1}{c}{High School} & \multicolumn{1}{c}{5 Years} & \multicolumn{1}{c}{School} & \multicolumn{1}{c}{5 Years} \\ \addlinespace & (1) & (2) & (3) & (4) \\ \midrule \emph{Panel A: Black registration} \\ \midrule" ) prefoot("\textit{Summary statistics:} \\ \midrule Dep. variable &`y1_mn'&`y1_mn'&`y1_mn'&`y1_mn' \\ &`y1_sd'&`y1_sd'&`y1_sd'&`y1_sd' \\ \addlinespace Black share, 1960 &`x1_mn'&`x1_mn'&`x1_mn'&`x1_mn' \\ &`x1_sd'&`x1_sd'&`x1_sd'&`x1_sd' \\ \midrule \addlinespace \addlinespace")

estout wh_5 wh_7 wh_9 wh_less_quad using education_1960.tex, append type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(black_share60_lit_nc black_share60 wh_less_5_years_blsh60_lit) order(black_share60_lit_nc black_share60 wh_less_5_years_blsh60_lit) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\addlinespace \midrule \emph{Panel B: White registration} \\ \midrule" ) prefoot("\textit{Summary statistics:} \\ \midrule Dep. variable &`y2_mn'&`y2_mn'&`y2_mn'&`y2_mn' \\ &`y2_sd'&`y2_sd'&`y2_sd'&`y2_sd' \\ \addlinespace Black share, 1960 &`x2_mn'&`x2_mn'&`x2_mn'&`x2_mn' \\ &`x2_sd'&`x2_sd'&`x2_sd'&`x2_sd' \\ \midrule \addlinespace \addlinespace") postfoot("\midrule \bottomrule\end{tabular} \begin{tablenotes}[flushleft] \scriptsize \item \leavevmode\kern-\scriptspace\kern-\labelsep Notes: The table estimates the long difference model in equation \eqref{longdiff}. The dependent variable is the 1980-1960 change in the log of registration rates in Panels A and B. All regressions include state dummies, the 1960 Black population share, and its interaction with the coverage (VRA) dummy. Regressions also include interactions between county controls and the coverage (VRA) dummy. Controls are: Unemployment rate (\%), 1960; Families below poverty line (\%), 1960; Rural farms (\%), 1960; Land devoted to harvested cotton (\%), 1959; Pro-Black protest, 1960-64; Anti-Black protest, 1960-64; Green Book establishments, 1955. The education variables are computed for the population above 25 years of age (by race): column (1) includes the share of the population with less than a high school diploma; columns (2) and (4) the share of the population with less than 5 years of education completed; columns (3) the share of the population without education. Regressions are weighed by 1960 population, and robust standard errors in parenthesis are adjusted for clustering by judicial divisions. ***, **, and * indicate statistical significance at the 1\%, 5\%, and 10\% levels, respectively.\end{tablenotes} \end{threeparttable} \end{center} \end{table}")




/*
Table 7. Electoral outcomes and local public goods provision
*/
cd $dataset
use "dataset_president_1.dta", clear

// Panel A, Column 1
xi: reg ch_ln_sh_wall_thur black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60 $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_1_short

quietly summarize sh_pres_48_dix_thurmond [aweight=pop1960] if e(sample)
local y2_mn: dis %8.3fc r(mean)
local y2_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x2_mn: dis %8.3fc r(mean)
local x2_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Panel A, column 2
xi: reg ch_ln_sh_nixo_dewe black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60 $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_2_short

quietly summarize sh_pres_48_r_dewey [aweight=pop1960] if e(sample)
local y4_mn: dis %8.3fc r(mean)
local y4_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x4_mn: dis %8.3fc r(mean)
local x4_sd = "(" + string(r(sd), "%8.3fc") + ")"

// Panel A, column 3
xi: reg ch_ln_sh_hump_trum black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60 $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_3_short

quietly summarize sh_pres_48_d_truman [aweight=pop1960] if e(sample)
local y3_mn: dis %8.3fc r(mean)
local y3_sd = "(" + string(r(sd), "%8.3fc") + ")"
quietly summarize black_share60 [aweight=pop1960] if e(sample)
local x3_mn: dis %8.3fc r(mean)
local x3_sd = "(" + string(r(sd), "%8.3fc") + ")"


// Panel B, column 4
xi: reg ch_ln_sh_reagan_eisen black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60 $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_4_long
 
su sh_pres_56_r_eisenhower if e(sample), d
local base_year_mean=round(r(mean),.001)
su black_share60 if e(sample), d
local black_share_mean =round(r(mean),.001)


cd $dataset
use "dataset_governor_1.dta", clear

// Panel B, column 1
xi: reg ch_ln_sh_cong_dem_1980_56 black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60 $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_1_long

// Panel B, column 2
xi: reg ch_ln_sh_sen_dem_1980_56 black_share60_lit_SMD black_share60_lit_nc black_share60_SMD black_share60 $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_2_long


cd $dataset
use "dataset_governor_2.dta", clear

// Panel A, column 4
xi: reg c_l_s_gov_rac_new_68_56 black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_4_short

// Panel B, column 3
xi: reg c_l_s_gov_dem_new_80_56 black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto col_3_long


cd $dataset
use "dataset_expenditure_1.dta", clear

// Panel C, column 1
xi: reg ch_empl black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto ch_empl

// Panel C, column 2
xi: reg ch_wage black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto ch_wage

// Panel C, column 3
xi: reg ch_educ black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto ch_educ

// Panel C, column 4
xi: reg ch_cap black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto ch_cap

// Panel C, column 5
xi: reg ch_sh_cap black_share60_lit_SMD black_share60_lit_nc black_share60 black_share60_SMD $controls_int ibn.STATE [aweight=pop1960] , nocon robust cluster(judicial_divisions_id)
est sto ch_sh_cap


// Table
cd $output
estout col_1_short col_2_short col_3_short col_4_short using election_outcomes_all.tex, replace type stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) keep(black_share60_lit_SMD black_share60_lit_nc) order(black_share60_lit_SMD black_share60_lit_nc) cells("b(star label( ) fmt(3))" "se(par label( ) fmt(3))") mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prehead("\begin{table}[ph!] \begin{center} \setlength\tabcolsep{6.0pt} \caption{Electoral outcomes and local public goods provision} \label{electoral_outcomes} \begin{threeparttable}\topcaption{@title}\renewcommand{\arraystretch}{0.8}\footnotesize" "\begin{tabular}{@{}l c c c c c} \toprule\midrule " "\textit{Dep. variable:} & Wallace- & Nixon- & Humphrey- & Segregationist \\" "& Thurmond & Dewey & Truman & Governors \\" "& (1) & (2) & (3) & (4) \\") prefoot(" & & & & \\") posthead("\midrule \emph{Panel A: Electoral outcomes up to 1968} \\ \midrule \\ ") ///

estout col_1_long col_2_long col_3_long col_4_long using election_outcomes_all.tex, stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) rename () keep(black_share60_lit_SMD black_share60_lit_nc) cells("b(star label( )  fmt(3))" " se(par label( ) fmt(3))") append mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prefoot(" & & & & \\") posthead("\midrule \\ \textit{Dep. variable:} & House & Senate & Governor & Reagan- \\ & Dem. Vote & Dem. Vote & Dem. Vote & Eisenhower \\" "& (1) & (2) & (3) & (4) \\" "\midrule \emph{Panel B: Electoral outcomes up to 1980} \\ \midrule \\ ") ///

estout ch_empl ch_wage ch_educ ch_cap ch_sh_cap using election_outcomes_all.tex, stats(r2_a  N, fmt(2 0) labels("Adj. R-Square" "N")) rename () keep(black_share60_lit_SMD black_share60_lit_nc) cells("b(star label( )  fmt(3))" " se(par label( ) fmt(3))") append mlabels(none) collabels(none) starlevels(* 0.10 ** 0.05 *** 0.01) nostardetach label msign (--) varwidth(12) modelwidth (10) style(tex) prefoot(" & & & & & \\" ) posthead("\midrule \\ \textit{Dep. variable:} & Employment & Spending & Spending & Capital & Sh. Capital \\ & & Salaries & Education & Spending & Spending \\" "& (1) & (2) & (3) & (4) & (5) \\" "\midrule \emph{Panel C: Spending up to 1982} \\ \midrule \\ ") postfoot("\midrule\bottomrule\end{tabular} \begin{tablenotes}[flushleft] \scriptsize \item \leavevmode\kern-\scriptspace\kern-\labelsep Notes: The table considers the triple interaction between the 1960 Black population share, the coverage (VRA) dummy, and an indicator equal to one if the county belongs to a state with SMD electoral rules. In Panel A, the dependent variable is: i) the change in the vote cast for Wallace (1968) and Thurmond (1948) in column (1); ii) the change in the vote cast for Nixon (1968) and Dewey (1948) in column (2); iii) the change in the vote cast for Humphrey (1968) and Truman (1948) in column (3); iv) the change in the vote cast for racist gubernatorial candidates (1968 and 1956) in column (4). In Panel B, the dependent variable is: i) the change in the vote cast for Democratic candidates in the House of Representatives (1980 and 1956) in column (1); ii) the change in the vote cast for Democratic candidates in the Senate (1980 and 1956) in column (2); iii) the change in the vote cast for gubernatorial Democratic candidates (1980 and 1956) in column (3); iv) the change in the vote cast for Reagan (1980) and Eisenhower (1956) in column (4). In Panel C, the dependent variable is: i) the change in total employment (1982 and 1957) in column (1); ii) the change in total spending on salaries (1982 and 1957) in column (2); iii) the change in educational spending (1982 and 1957) in column (3); iv) the change in capital spending (1982 and 1957) in column (4); v) the change in the share of capital spending (1982 and 1957) in column (5). All regressions include state dummies, the 1960 Black population share, and its interaction with the coverage (VRA) dummy. Regressions also include interactions between county controls and the coverage (VRA) dummy. Controls are: Low-skilled (\%), 1960; Unemployment rate (\%), 1960; Families below poverty line (\%), 1960; Rural farms (\%), 1960; Land devoted to harvested cotton (\%), 1959; Pro-Black protest, 1960-64; Anti-Black protest, 1960-64; Green Book establishments, 1955. Regressions are weighed by 1960 population, and robust standard errors in parenthesis are adjusted for clustering by judicial divisions. ***, **, and * indicate statistical significance at the 1\%, 5\%, and 10\% levels, respectively.\end{tablenotes} \end{threeparttable} \end{center} \end{table}")












